package com.heima.user.feign;

import com.heima.feign.user.IUserClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserClient implements IUserClient {
    @Autowired
    private ApUserService apUserService;
    /**
     * 根据用户id查询用户信息
     *
     * @param userId
     * @return
     */
    @Override
    @PostMapping("/api/v1/user/{userId}")
    public ResponseResult getUseInfo(@PathVariable Integer userId) {
        return apUserService.getUserInfo(userId);
    }
}
